package com.boot.study.message;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: lkz
 * @Title: AbstractRedisMessage
 * @Description: redis 消息基类
 * @Date: 2023/11/2 10:59
 */
@Data
public abstract class AbstractRedisMessage {

    /**
     * 头
     */
    private Map<String, String> headers = new HashMap<>();

    public String getHeader(String key) {
        return headers.get(key);
    }

    public void addHeader(String key, String value) {
        headers.put(key, value);
    }

}
